#ifndef SRC_CORE_TPCM_TPCM_CONFIG_H_
#define SRC_CORE_TPCM_TPCM_CONFIG_H_
//cmd_map input_map output_map cmd_vadrr
#define CONFIG_COMMAND_EXTRA_SIZE 	32
#define CONFIG_MAX_CMMAND_HEADER   	256
#define CONFIG_MAX_NOTIFY_SIZE  	128
#define CONFIG_LOCAL_NOTIFY_DATA_SIZE  	224
#define CONFIG_REFERENCE_MEMORY 0x4000000
#define CONFIG_HASH_TABLE_SIZE	(64 * 1024)
#define CONFIG_FLASH_BLOCK_SIZE	(64 * 1024)
#define CONFIG_SM4_CONTEXT_MAX_SIZE 360
#define CONFIG_SM3_CONTEXT_MAX_SIZE 250
#define CONFIG_MALLOC_BLOCK_SIZE  (64 * 1024)
#define CONFIG_MAP_BLOCK_SIZE  (64 * 1024)
#define CONFIG_TPCM_SLEEP_DATA_ALL_STORE_SIZE 0
#define CONFIG_TPCM_SLEEP_DATA_SIZE 0

#define CONFIG_WAITING_COMMAND_COUNT (1024*1024*100UL)

//#ifdef TCM_NV_DISK
/* TCM_NV_DISK uses the TCM_PATH environment variable */
/*
	TCM_KEY_HANDLES, TCM_NUM_PCR, TCM_MIN_AUTH_SESSIONS, TCM_MIN_TRANS_SESSIONS,
	TCM_MIN_DAA_SESSIONS, TCM_MIN_SESSION_LIST, etc.
*/
#define CONFIG_TCM_MAX_SAVESTATE_SPACE 100000	/* arbitrary value */
/*
	TCM_MAX_NV_SPACE defines the maximum NV space for non-volatile state.
*/
#define CONFIG_TCM_MAX_NV_SPACE 100000	/* arbitrary value */

/* TCM_MAX_NV_DEFINED_SIZE defines the maximum NV space for non-volatile state available to users*/

#define TCM_MAX_NV_DEFINED_SIZE 0x4000

/* TCM_MAX_VOLATILESTATE_SPACE defines the maximum NV space for TCM volatile state.

   It is used for applications that save and restore the entire TCM volatile is a non-standard way.
*/
#define CONFIG_TCM_MAX_VOLATILESTATE_SPACE 524288	/* arbitrary value */
//#endif


#define CONFIG_TCM_NORFLASH_START_ADDR 0
//#define CONFIG_TCM_NORFLASH_END_ADDR 0x7000

#define CONFIG_TCM_PERMANENT_STRUCTURE_SIZE 0x10000											 
#define CONFIG_TCM_SAVESTATE_STRUCTURE_SIZE 0x10000



//CONFIG_TCM_PERMANENT_STRUCTURE_SIZE + CONFIG_TCM_PERMANENT_STRUCTURE_SIZE + CONFIG_TCM_SAVESTATE_STRUCTURE_SIZE
#define CONFIG_TPCM_NORFLASH_START_ADDR  (CONFIG_TCM_PERMANENT_STRUCTURE_SIZE + CONFIG_TCM_PERMANENT_STRUCTURE_SIZE + CONFIG_TCM_SAVESTATE_STRUCTURE_SIZE)
//#define CONFIG_TPCM_WHITELIST_HEAD_OFFSET        0x0 //offset to white list area

#define CONFIG_TPCM_PERMANENT_STRUCTURE_SIZE 0x10000
//#define CONFIG_TPCM_WHITELIST_HEAD_SIZE     0x10000


#define CONFIG_TPCM_NORFLASH_END_ADDR 0x2000000

#define CONFIG_IMEASURE_IN_TPCM 1
#define CONFIG_DMEASURE_IN_TPCM 1
#define CONFIG_SIMPLE_BOOT_IN_TPCM 1
#define CONFIG_EXTERNAL_BIOS_MEASURE 0
#define CONFIG_SUPPORT_UPGRADE 1
#define CONFIG_SUPPORT_FLASH_ACCESS 0
#define CONFIG_LICENSE_IN_TPCM          1        //0---close ; 1-----open

#define CONFIG_SUPPORT_FLASH_ENCRYPT 1
#define CONFIG_SUPPORT_BACKUP     1
#define CONFIG_SUPPORT_KEY_MANAGE 1
#define CONFIG_SUPPORT_TRUSTED_LINK_POLICY  1

#define CONFIG_SUPPORT_ALG_TEST  0
#ifndef TPCM_PLATFORM_BASIC
#define TPCM_PLATFORM_BASIC    1   //1----basicplatform;0---no
#endif
#if (TPCM_PLATFORM_BASIC == 1)
#define CONFIG_SUPPORT_SIMPLE_IMEASURE  1
#define CONFIG_SUPPORT_PROCESS_IDENTITY 1
#define CONFIG_SUPPORT_PROCESS_ROLES    1
#define CONFIG_SUPPORT_SHELL            1
#define CONFIG_SUPPORT_DMEASURE_PROCESS 1
#define CONFIG_IS_VTPCM                 0
#define CONFIG_SUPPORT_FILE_PROTECT     1
#else

#define CONFIG_SUPPORT_SIMPLE_IMEASURE  0
#define CONFIG_SUPPORT_PROCESS_IDENTITY 0
#define CONFIG_SUPPORT_PROCESS_ROLES    0
#define CONFIG_SUPPORT_SHELL            0
#define CONFIG_SUPPORT_DMEASURE_PROCESS 0

#endif

#define CONFIG_SUPPORT_S3_SLEEP_MODE	0



#define CONFIG_TPCM_TPYE	3
#define CONFIG_CPU_NUMBER  	1

//#define TPCM_LEVEL_DEBUG


#endif /* SRC_CORE_TPCM_TPCM_CONFIG_H_ */
